<%@ page language="java" contentType="text/html; charset=ISO-8859-2"
	pageEncoding="ISO-8859-2"%>
<%@ page errorPage="/WEB-INF/ErrorPage.jsp"%>
<%@ page import="events.EventsHome, db.Events, java.util.List"%>
<%@ include file="WEB-INF/logged.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2">
<link rel="stylesheet" href="style1.css" type="text/css">
<script type="text/javascript" charset="iso-8859-2" src="Script/skin.js"></script>
<title>runner.pl</title>
</head>
<body>
	<div class="content">
		<jsp:include page="/WEB-INF/top.html" flush="true" />
		<jsp:include page="/WEB-INF/user_menu.html" flush="true" />

		<div id="main">
			<div class="tresc">
				<%
   		List<Events> events = EventsHome.getEvents();
		if(events != null)
   		for(int i = events.size(); i > 0; i--) {
   			Events e = events.get(i-1);
   %>
         
				<p class="tytul"><%=e.getTitle()%></p>
				<p class="data"><%=e.getData().getDate() + "." + (e.getData().getMonth() + 1) + "." + 
   								+ (1900 + e.getData().getYear()) + " " + e.getData().getHours() + ":" + ((e.getData().getMinutes()<10) ? ("0" + e.getData().getMinutes()) : e.getData().getMinutes())%></p>
				<br>
				<br>
				<p><%=e.getContents()%></p>
				<table class="event" CELLSPACING="10">
					<tr>
						<td><b>Start:</b></td>
						<td><%=e.getStart()%></td>
						<td><b>Meta: </b></td>
						<td><%=e.getStop()%></td>
						<td><b>Dystans:</b></td>
						<td><%=e.getDistance()%> km</td>
						</tr>
				</table>
				<div class="line"></div>

				<%
		}
   %>
			</div>
		</div>
		<jsp:include page="/WEB-INF/footer.html" flush="true" />
	</div>
</body>
</html>